package com.neusoft.neuiotms.dcom.repository.insurance;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcom.model.enums.InsuranceInspectionTaskType;
import com.neusoft.neuiotms.dcom.model.enums.InsuranceTaskStatus;
import com.neusoft.neuiotms.dcom.model.insurance.InsuranceInspectionTask;

public interface InsuranceInspectionTaskRepository
        extends JpaRepository<InsuranceInspectionTask, Long>, CustomizedInsuranceInspectionTaskRepository {

    List<InsuranceInspectionTask> findByRegisterTaskId(Long registerTaskId);

    InsuranceInspectionTask findByRegisterTaskIdAndType(Long registerTaskId, InsuranceInspectionTaskType type);

    int countByExecutorCodeAndStatusIn(String userCode, List<InsuranceTaskStatus> status);

}
